Some VMS changes from Richard Levitte <levitte@e.kth.se>:
authorJim Blandy <jimb@redhat.com>
Thu, 18 Mar 1993 16:11:17 +0000 (16:11 +0000)
committerJim Blandy <jimb@redhat.com>
Thu, 18 Mar 1993 16:11:17 +0000 (16:11 +0000)
* [VMS] systime.h: Include vmstime.h.  VMS has the timezone
variable and the tzname array.
* s/vms.h: VMS does have select.
mth$dmod is the same as Unix's drem.
Use the time functions in vmstime.c.
No need to rename the malloc routines if we're using GNU malloc.
PURESIZE needs to be 330000.
* vmstime.c, vmstime.h: New files.
* systty.h: Don't try to initialize extern declarations under VAX C.
* vmspaths.h (PATH_LOADSEARCH): Include EMACS_LIBRARY:[LOCAL-LISP]
in PATH_LOADSEARCH.
(PATH_EXEC): Use EMACS_LIBRARY:[LIB-SRC] instead of [ETC].
* sysdep.c [VMS] (init_sys_modes): Don't allocate process_ef.
[VMS] (queue_kbd_input): Build events structure correctly.
[VMS] (gethostname): New function.
[VMS] (getwd): Don't get the PATH environment variable; that's
dumb.  Call getcwd.

src/s/vms.h

index ad2df144c641487d93ffbf2c79c0a0657e1145a8..01041b3e140f59da0943dfa64fe9831285f4430e 100644 (file)
@@ -60,7 +60,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  *     Define HAVE_SELECT if the system supports the `select' system call.
  */
 
-/* #define HAVE_SELECT */
+#define HAVE_SELECT            /* There is an emulation in vmsproc.c */
 
 /*
  *     Define HAVE_PTYS if the system supports pty devices.
@@ -152,7 +152,18 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define index strchr
 #define rindex strrchr
 #define unlink delete
-  
+
+#ifndef _GNUC_
+extern double mth$dmod(double, double);
+#define drem mth$dmod
+#endif
+
+/* Some time rountines are missing in the VAX C RTL, or needs some
+   extra bit of code */
+#define tzset sys_tzset
+#define localtime sys_localtime
+#define gmtime sys_gmtime
+
 /* On later versions of VMS these exist in the C run time library, but
    we are using our own implementations.  Hide their names to avoid
    linker errors */
@@ -160,6 +171,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define execvp sys_execvp
 #define system sys_system
 
+#ifndef GNU_MALLOC
 /* Hide these names so that we don't get linker errors */
 #define malloc sys_malloc
 #define free sys_free
@@ -169,6 +181,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* Don't use the standard brk and sbrk */
 #define sbrk sys_sbrk
 #define brk sys_brk
+#endif
 
 /* On VMS we want to avoid reading and writing very large amounts of
    data at once, so we redefine read and write here. */
@@ -201,6 +214,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* Case conflicts with C library srandom. */
 #define Srandom S_random
 
+/* variable length too long... maybe */
+#if 0
+#define do_line_insertion_deletion_costs do_line_insertion_deletion_cost
+#endif
+
 /* Cause initialization of vmsfns.c to be run.  */
 #define SYMS_SYSTEM syms_of_vmsfns ()
 
@@ -223,7 +241,7 @@ globalref char sdata[];
 { 0, 50, 75, 110, 134, 150, 300, 600, 1200, 1800, \
   2000, 2400, 3600, 4800, 7200, 9600, 19200 }
 
-#define PURESIZE 132000
+#define PURESIZE 330000
 
 /* Stdio FILE type has extra indirect on VMS, so must alter this macro.  */